/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package settings;

import java.io.BufferedReader;
import java.io.FileReader;

/**
 *
 * @author Dark Mark
 */
public class Config
{
    public static String testFilePath = "";

    public Config()
    {
        load();
    }

    public void load()
    {
        FileReader fr = null;
        BufferedReader br = null;
        try
        {
            fr = new FileReader("Config.ini");
            br = new BufferedReader(fr);
            String line = null;
            String attribute = null, value = null;

            while ((line = br.readLine()) != null)
            {
                attribute = line.substring(0, line.indexOf("="));
                value = line.substring(line.indexOf("=") + 1);
                if (attribute.equalsIgnoreCase("testFilePath"))
                {
                    testFilePath = value;
                }
            }

            br.close();
            fr.close();
        }
        catch (Exception ex)
        {
            //ex.printStackTrace();
            System.out.println("Cannot open file: 'Config.ini'");
            testFilePath = "";
        }
    }
}
